# -*- coding: utf-8 -*-
"""
Date: 2021-12-03
Author: J z
"""
from kazoo.client import KazooClient

import logging
logging.basicConfig()

zk = KazooClient(hosts="127.0.0.1:2181")
zk.start()
# path = "/china/henan"
# zk.ensure_path(path)
# zk.create("/china/abbb", b"this is china node.")
# zk.create(path, "aaa", makepath=True)
# if zk.exists(path):
#     print 1
data, state = zk.get("/china/abbb")
print data, state.version


